<%@ page language="java" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>钱包-交易记录,交易明细管理</title>
    <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
    <jsp:include page="../com/header.jsp"></jsp:include>
    <script type="text/javascript" src="../../js/comm/listcomm.js"></script>
    <script type="text/javascript">
        var contentUrl = root + "cms/walletTradeRecord/findWalletTradeRecordNEStatusPage";
        var editUrl = 'walletTradeRecordEdit.jsp?id=';
        var operateUrl = root + 'cms/walletTradeRecord/operateWalletTradeRecordByIds';
        function getfilter() {
            var _jsonFilter = "{";
            if ($("#search_userId").val() && $("#search_userId").val().length > 0) {
                _jsonFilter += "'search_EQ_userId':'" + $("#search_userId").val().replace("'", "\"") + "',";
            }
            if ($("#search_money").val() && $("#search_money").val().length > 0) {
                _jsonFilter += "'search_EQ_money':'" + $("#search_money").val().replace("'", "\"") + "',";
            }
            if ($("#search_tradeType").val() && $("#search_tradeType").val().length > 0) {
                _jsonFilter += "'search_EQ_tradeType':'" + $("#search_tradeType").val().replace("'", "\"") + "',";
            }
            if ($("#search_incomeExpendType").val() && $("#search_incomeExpendType").val().length > 0) {
                _jsonFilter += "'search_EQ_incomeExpendType':'" + $("#search_incomeExpendType").val().replace("'", "\"") + "',";
            }
            if ($("#search_incomeExpendMethod").val() && $("#search_incomeExpendMethod").val().length > 0) {
                _jsonFilter += "'search_EQ_incomeExpendMethod':'" + $("#search_incomeExpendMethod").val().replace("'", "\"") + "',";
            }
            if ($("#search_tradeOrderNo").val() && $("#search_tradeOrderNo").val().length > 0) {
                _jsonFilter += "'search_EQ_tradeOrderNo':'" + $("#search_tradeOrderNo").val().replace("'", "\"") + "',";
            }
            if ($("#search_tradeStatus").val() && $("#search_tradeStatus").val().length > 0) {
                _jsonFilter += "'search_EQ_tradeStatus':'" + $("#search_tradeStatus").val().replace("'", "\"") + "',";
            }
            if (_jsonFilter != "{") {
                _jsonFilter = _jsonFilter.substring(0, _jsonFilter.length - 1);
            }
            _jsonFilter += "}";
            return _jsonFilter;
        }
    </script>
</head>
<body>
<section>
    <div>
        <div class="col-xs-12">
            <div class="box">
                <form id="search_form" class="form-horizontal">
                    <div class="tabSelect" id="selectHeadId">
                        <br>
                        <div class="form-group  col-md-3 search-form">
                            <label class="col-md-4 control-label controls" for="">用户id：</label>
                            <div class="col-md-8">
                                <input type="text" placeholder="用户id" class="form-control input-sm" id="search_userId"
                                       name="userId"/>
                            </div>
                        </div>
                        <div class="form-group  col-md-3 search-form">
                            <label class="col-md-4 control-label controls">交易类型：</label>
                            <div class="col-md-8">
                                <select class="form-control input-sm" id="search_tradeType" name="tradeType">
                                    <option value="">请选择</option>
                                    <option value="1">充值</option>
                                    <option value="2">提现</option>
                                    <option value="3">消费</option>
                                    <option value="4">佣金分成</option>
                                    <option value="5">消费钱包退款</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group  col-md-3 search-form">
                            <label class="col-md-4 control-label controls" for="">收支类型：</label>
                            <div class="col-md-8">
                                <select class="form-control input-sm" id="search_incomeExpendType"
                                        name="incomeExpendType">
                                    <option value="">请选择</option>
                                    <option value="1">收入</option>
                                    <option value="-1">支出</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group  col-md-3 search-form">
                            <label class="col-md-4 control-label controls" for="">交易订单号：</label>
                            <div class="col-md-8">
                                <input type="text" placeholder="交易订单号" class="form-control input-sm"
                                       id="search_tradeOrderNo" name="tradeOrderNo"/>
                            </div>
                        </div>
                        <div class="form-group  col-md-3 search-form">
                            <label class="col-md-4 control-label controls" for="">交易状态：</label>
                            <div class="col-md-8">
                                <select class="form-control input-sm" id="search_tradeStatus" name="tradeStatus">
                                    <option value="">请选择</option>
                                    <option value="0">交易完成</option>
                                    <option value="1">交易进行中</option>
                                </select>
                            </div>
                        </div>
                        <input type="button" value="查询" id="search" class="btn btn-primary searchBtn">
                    </div>
                </form>
                <div class="box-body table-responsive" style="clear:both;">
                    <input type="button" value="删除" id="deleteSome" class="btn btn-danger">
                </div>
                <div class="box-body table-responsive">
                    <table id="example2" class="table table-bordered table-hover">
                        <thead>
                        <tr>
                            <th width="30"><input type="checkbox" id="_selectAll"/></th>
                            <th width="80">用户id</th>
                            <th width="120">交易订单号</th>
                            <th width="80" style="text-align: right">交易金额</th>
                            <th width="80">交易类型</th>
                            <th width="80">收支类型</th>
                            <th width="80">收支方式</th>
                            <th width="80">交易状态</th>
                            <th width="80" style="text-align: right">账号余额</th>
                            <th width="80">创建时间</th>
                            <th width="80">交易备注</th>
                            <th width="80">状态</th>
                        </tr>
                        </thead>
                        <!-- 表格内容 start -->
                        <tbody id="mycontent"></tbody>
                        <!-- 表格内容 end -->
                    </table>
                    <!-- 分页标签 start -->
                    <div class="row page_big_div" id="displayPage"></div>
                    <!-- 分页标签 end -->
                    <script id="tableContentTmple" type="text/x-jsrender">
								<tr>
									<td><input id="ck_{{:id}}" ckId="{{:id}}" ckStatus="{{:status}}" class="ckSelect" type="checkbox" ck_userId="{{:userId}}" /></td>
									<td>{{:user.userName}}</td>
									<td>{{:tradeOrderNo}}</td>
									<td style="text-align: right">{{toThousands:money}}</td>
									<td>{{if tradeType==1}}充值{{else tradeType==2}}提现{{else tradeType==3}}消费{{else tradeType==4}}佣金分成{{else tradeType==5}}消费钱包退款{{else}}提现关闭退款{{/if}}</td>
									<td>{{if incomeExpendMethod==0}}平台内部{{else}}支付宝{{/if}}</td>
									<td>{{if incomeExpendType==1}}收入{{else}}支出{{/if}}</td>
									<td>{{if tradeStatus==0}}交易完成{{else tradeStatus==1}}交易进行中{{else}}交易关闭{{/if}}</td>
									<td style="text-align: right">{{toThousands:accountBalance}}</td>
									<td>{{:createTime}}</td>
									<td style="text-align: left" title="{{:remarks}}">{{subStrings:remarks lens=22}}</td>
									<td>{{if status==1}}正常{{else status==2}}已发布{{else status==3}}已删除{{else status==-1}}已锁定{{else}}无效{{/if}}</td>
								</tr>

                    </script>
                </div>
            </div>
        </div>
</section>
</body>
</html>